<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>节点操作</title>
</head>

<body>
    <div>我是div</div>
    <span>我是span</span>
    <ul>
        <li>李昊哲</li>
        <li>刘晓兰</li>
        <li>phoenix</li>
        <li>小兰兰</li>
    </ul>
    <div id="family">
        <div class="father">
            爸爸
            <div class="son">儿子</div>
        </div>
    </div>
</body>

</html>
<script>
    let son = window.document.querySelector('.son');
    window.console.log(son.parentNode);
    window.console.log(son.parentElement);
    window.console.log(son.parentNode.parentNode.children);
    window.console.log(son.parentNode.parentNode.children[0].innerText);
    window.console.log(son.parentNode.innerText);
</script>